/**
 * @closure
 * @param JQuery jquery当前对象
 * @description 页面模块加载与通道建立
 */
;(($)=>{
    //模块装载
    try {
        import('./jquery.moudles.detail.js?'+Math.random()).then(data=>{
            let moudles=data.moudles,moudlesFilter=[],urlHash=window.location.hash;
            Object.keys(moudles).forEach(key => {
                if(urlHash.indexOf(key)>-1){
                    moudlesFilter=[...moudles[key]];
                }
            });
            moudlesFilter.map((v,k)=>{
                $.extend({
                    [v.moudle]:()=>{
                        return import(`${v.path}`);
                    }
                });
            });

            if(moudlesFilter.length==0 && urlHash.indexOf("custom_")>-1 ){
                let defaultJson = {"moudle":"custom","path":"./components/custom/custom_contain.js?"+Math.random()};
                $.extend({
                    [defaultJson.moudle]:()=>{
                        return import(`${defaultJson.path}`);
                    }
                });
            }
        });
    } catch (error) {
        console.log("Error: " + error );
    }
})(window.jQuery||$);

/**                  佛祖保佑       永无BUG
 *
 *                         _ooOoo_
 *                        o8888888o
 *                        88" . "88
 *                        (| -_- |)
 *                        O\  =  /O
 *                     ____/`---'\____
 *                    .'  \\|     |//  `.
 *                   /  \\|||  :  |||//  \
 *                  /  _||||| -:- |||||-  \
 *                  |   | \\\  -  /// |   |
 *                  | \_|  ''\---/''  |   |
 *                  \  .-\__  `-`  ___/-. /
 *                ___`. .'  /--.--\  `. . __
 *             ."" '<  `.___\_<|>_/___.'  >'"".
 *            | | :  `- \`.;`\ _ /`;.`/ - ` : | |
 *            \  \ `-.   \_ __\ /__ _/   .-` /  /
 *       ======`-.____`-.___\_____/___.-`____.-'======
 *                          `=---='
 *      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 *                    佛祖保佑       永无BUG
*/
